package es.cazadoresmadridejos.common.bean.manager.impl;

import java.util.List;

import es.cazadoresmadridejos.common.bean.dao.Dao;
import es.cazadoresmadridejos.common.bean.manager.Manager;
import es.cazadoresmadridejos.model.BaseEntity;

public abstract class ManagerImpl<T extends BaseEntity>  implements Manager<T>{

	protected Dao<T> dao;
	
	@Override
	public abstract void setDao(Dao<T> dao);
	
	@Override
	public T get(Long id) {
		return dao.get(id);
	}

	public Long save(T entity){
		return dao.save(entity);
	}
	
	public List<T> findAll(){
		return dao.findAll();
	}

	@Override
	public void delete(Long id) {
		dao.delete(id);
	}
	
	@Override
	public void disable(Long id) {
		dao.disable(id);
	}

}
